<?php

namespace maotool\src\test;

use maotool\core\annotation\v8\FormValidateRule;
use maotool\core\annotation\v8\FormValidateRules;
use maotool\core\validate\FormValidateRuleData;

#[FormValidateRule(required: true, message: "对象不能为空")]
class Users
{

    #[FormValidateRule(required: true)]
    private $name;

    #[FormValidateRules(value: [
        new FormValidateRuleData(true, "年龄不能为空"),
        new FormValidateRuleData(false, "年龄不能小于18", min: 18),
        new FormValidateRuleData(false, "年龄不能超过25", min: 25),
    ])]
    private $age;

}